---
title: Basic Streaming Agent
---

## Code

```python cookbook/models/cometapi/basic_stream.py
from agno.agent import Agent
from agno.models.cometapi import CometAPI

agent = Agent(model=CometAPI(id="gpt-5-mini"), markdown=True)

# Print the response in the terminal with streaming enabled
agent.print_response("Explain quantum computing in simple terms", stream=True)

```

## Usage

<Steps>
  <Snippet file="create-venv-step.mdx" />

<Step title="Set your API key">```bash export COMETAPI_KEY=xxx ```</Step>

<Step title="Install libraries">```bash pip install -U agno openai ```</Step>

  <Step title="Run Agent">
    <CodeGroup>
    ```bash Mac
    python cookbook/models/cometapi/basic_stream.py
    ```

    ```bash Windows
    python cookbook/models/cometapi/basic_stream.py
    ```
    </CodeGroup>

  </Step>
</Steps>
